<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-br">
    <head>
        <?php echo $this->Html->charset('UTF-8'); ?>
	<title>Quero Bolsa</title>
	<?php

		echo $this->Html->css('layout.css');
                echo $this->Html->css('formulario.css');
                
                echo $this->Html->script('jquery-1.10.2.js');
                echo $this->Html->script('modal.js');

		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
	?>
    </head>

    <body>

    <div id="container">
        <div id="cabecalho">
            <?php echo $this->Html->image('QueroBolsa_Logo.png', array('alt' => "QueroBolsa_Logo")); ?>
                
                <?php if(isset($user_logado) && count($user_logado) > 0){ ?>
                <div id="logado">
                    <p>Bem vindo, <?php echo $user_logado['nome']; ?>.</p>
                    <button id="sair" onclick="javascript:document.location = '<?php echo $this->webroot; ?>Bolsa/logout'">Sair</button>
                </div>
                <?php } else {?>
                <div id="logar">
                    <form id="login" action="<?php echo $this->webroot; ?>Bolsa" method="POST">
                        <div class="field">
                        <label for="usuario">Usuário:</label>
                        <br />
                        <input type="text" class="input" name="data[Usuario][login]" id="senha" />
                            </div>
                        <div class="field">
                        <label for="usuario">Senha:</label>
                        <br />
                        <input type="password" class="input" name="data[Usuario][password]" id="senha" />
                            </div>
                        <br />
                        <button id="entrar" type="submit">Entrar</button>
                    </form>
                    <?php echo $this->Html->image('cadeado.png', array('alt' => "QueroBolsa_Logo")); ?><p>Login</p>
                    <br />

                </div>
                <?php } ?>
                

            <form id="pesquisa" action="">
                <input type="button" />

                <select>
                  <option value="Monitoria">Monitoria</option>
                  <option value="Iniciação">Iniciação</option>
                  <option value="PBIC">PBIC</option>
                  <option value="PBID">PBID</option>
                </select>

                <input type="search" name="pesquisar" placeholder="Digite a sua pesquisa..." />
                <p>Ex.: Agronomia, História, Matemática.</p>
            </form>

        </div>
        
        <?php if(isset($user_logado) && count($user_logado) > 0){ ?>
            <div id="menu">
                <a href="<?php echo $this->webroot; ?>Bolsa"><?php echo $this->Html->image('home-13.fw.png', array('alt' => "QueroBolsa_Logo")); ?></a>
                <ul>
                    <?php if($user_logado['tipo'] == 2){?>
                     <li><?php echo $this->Html->link("Ofertar", array("controller" => "Usuario", "action" => "adicionarBolsa", $user_logado['id'])); ?></li>
                    <?php } ?>
                    <?php if($user_logado['tipo'] == 1){?>
                     <li><?php echo $this->Html->link("Acompanhamento", array("controller" => "Usuario", "action" => "acompanharBolsas", $user_logado['id'])); ?></li>
                    <?php }else{ ?>
                     <li><?php echo $this->Html->link("Acompanhamento", array("controller" => "Usuario", "action" => "acompanharCadidaturas", $user_logado['id'])); ?></li>
                    <?php } ?>
                    <li><?php echo $this->Html->link("Meu Perfil", array("controller" => "Usuario", "action" => "perfil")); ?></li>
                    <li></li>
                </ul>
            </div>
        <?php } ?>
        
        <div id="content">
            <?php echo $this->Session->flash(); ?>

            <?php echo $this->fetch('content'); ?>
        </div>
        <div id="rodape">
            <?php echo $this->Html->image('sprite.png', array('alt' => "")); ?>
            <p>Todos os direitos reservados - UFRPE</p>
        </div>
    </div>
    </body>
</html>